function f = gammafunc(T,beta, M, pxest)
 

theta1 = ones(M,1);
for m=1:M
    
B = 1;
for t=2:T
temp = beta^(t-1);
temp2 = (beta^(t-1))*( pxest(2,m)^(t-1));
B = B+temp;
theta1(m) = theta1(m) + temp2;
end
end
theta1 = theta1/B;

f = theta1;

end


